//============================================================================
// Name        : Rank.cpp
// Author      : lucmir@dcc.ufmg.br
// Description :
//============================================================================

#include "Rank.h"

Rank::Rank() {
	this->accumulators = new std::map<unsigned int, double>();
}

Rank::~Rank() {
	this->accumulators->clear();
	delete this->accumulators;
}

void Rank::setAccumulator(unsigned int docId, double value) {
	(* this->accumulators)[docId] = value;
}

void Rank::updateAccumulator(unsigned int docId, double value) {
	(* this->accumulators)[docId] += value;
}

Accumulators *Rank::getAccumulators() {
	return this->accumulators;
}

